package cn.fsd.nacos;

import cn.fsd.domain.Order;
import cn.fsd.query.delivery.PurchaseBillQuery;
import cn.fsd.vo.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import static cn.fsd.util.FeignConstant.CustomerServiceUrl;

@Component
@FeignClient(value = "customer-server",url = CustomerServiceUrl)
public interface CustomerServer {

    @RequestMapping(value = "order/changeOrderStatus/{order_id}/{status}", method = RequestMethod.POST)
    ResultBean changeOrderStatus(@PathVariable String order_id, @PathVariable String status);

    @GetMapping("order/getOrderById")
    Order getTheOrder(@RequestParam("orderId") String orderId);

    @RequestMapping(value = "order/changeDeliveryStatus/{order_id}/{status}", method = RequestMethod.POST)
    ResultBean changeDeliveryStatus(@PathVariable String order_id, @PathVariable String status);
}
